package com.keymozy.clients;

import com.keymozy.state.RespData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@FeignClient(name="client",url="http://localhost:8082")
public interface ImgClient {
    @PostMapping(value = "/upload",consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    RespData addImg(@RequestPart("file") MultipartFile file,@RequestParam("dir") String dir);

    @GetMapping("/rm")
    RespData rmImg(@RequestParam("file")String file);
}
